﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication4._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        th{
            width:200px;
            text-align:center;
        }
        tr{
            text-align:center;
        }
    </style>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
             <asp:BoundField DataField="Id" HeaderText="id" ReadOnly="true" />
             <asp:BoundField DataField="StuName" HeaderText="姓名" />
             <asp:BoundField DataField="StuSex" HeaderText="性别" />
             <asp:BoundField DataField="Remark" HeaderText="备注" />
            <asp:CommandField ButtonType="Button" ShowDeleteButton="True" ShowEditButton="True" />
        </Columns>

    </asp:GridView>
    <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" />
</asp:Content>
